 package xin.petstore.framework.cipher;
 

 import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;
 import org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig;
 
 public class Test
 {
   public static void main(String[] args)
   {
     EnvironmentStringPBEConfig con = new EnvironmentStringPBEConfig();
     con.setAlgorithm("PBEWithMD5AndDES");
     con.setPassword("1qazxsw23edc");
     StandardPBEStringEncryptor en = new StandardPBEStringEncryptor();
     en.setConfig(con);
     System.out.println(en.encrypt("petstore_db"));
   }
 }

